<template>
  <NavBar>
    <div slot="center">购物车({{ len }})</div>
  </NavBar>
</template>

<script>
import NavBar from "components/common/navbar/NavBar";
import {mapGetters} from "vuex";

export default {
  components: {
    NavBar,
  },
  computed: {
    //辅助函数,专门获取store里面的getters方法
    ...mapGetters({
      len: "getCartLen",
    }),
  },
};
</script>

<style>
</style>